package dxunderground.utilities.ocr;

import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

import dxunderground.utilities.sql.Sql.Type;
import junit.framework.TestCase;

public class CaptchaDaoTest extends TestCase {
	public void test() throws Exception {
		// URL url = new
		// URL("http://www.filedropper.com/securimage/securimage_show.php");
		// BufferedImage img = ImageIO.read(url);
		// BufferedImage img = ImageIO.read(new
		// File("./OCR Training/Times New Roman.bmp"));
		BufferedImage img = ImageIO.read(new File("/securimage_show.php.png"));
		CaptchaDao captcha = new CaptchaDaoImpl(KnownCaptchas.FILEDROPPER, Type.SQLITE3);
		CaptchaImage sampleImage = captcha.parseImage(img);
		captcha.saveImage(sampleImage);
		captcha.getImages();
	}
}
